home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / Includes / input / keyboard.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-20  |  2.2 KB  |  90 lines

  1. #ifndef INPUT_KEYBOARD_H
  2. #define INPUT_KEYBOARD_H TRUE
  3.  
  4. /*
  5. **  $VER: keyboard.h V0.9B
  6. **
  7. **  (C) Copyright 1996-1997 DreamWorld Productions.
  8. **      All Rights Reserved.
  9. */
  10.  
  11. #ifndef DPKERNEL_H
  12. #include <games/dpkernel.h>
  13. #endif
  14.  
  15. /****************************************************************************
  16. ** The Keyboard object.
  17. */
  18.  
  19. #define KEYVERSION 1
  20. #define TAGS_KEYBOARD ((ID_SPCTAGS<<16)|ID_KEYBOARD)
  21.  
  22. struct Keyboard {
  23.   struct Head Head;     /* 00: Standard header */
  24.   LONG   Size;          /* 12: Size of key buffer */
  25.   BYTE   *Buffer;       /* 16: Pointer to key buffer */
  26.   WORD   AmtRead;       /* 20: Amount of keys read from last query */
  27.   WORD   prv;           /* 22: */
  28.   LONG   prvID;         /* 24: Private ID */
  29. };
  30.  
  31. #define KEYA_Size (TLONG|12)
  32.  
  33. /****************************************************************************
  34. ** Non-ASCII key codes.
  35. */
  36.  
  37. #define K_SCS    0x80   /* Screen switch (LeftAmiga + M) */
  38. #define K_DEL    0x81
  39. #define K_HELP   0x82
  40.  
  41. #define K_LSHIFT 0x83   /* Left Shift  */
  42. #define K_RSHIFT 0x84   /* Right Shift */
  43. #define K_CAPS   0x85   /* Caps Lock   */
  44. #define K_CTRL   0x86   /* Control     */
  45. #define K_LALT   0x87   /* Left Alt    */
  46. #define K_RALT   0x88   /* Right Alt   */
  47. #define K_LAMIGA 0x89   /* Left Amiga  */
  48. #define K_RAMIGA 0x8a   /* Right Amiga */
  49.  
  50. #define K_F1     0x8b
  51. #define K_F2     0x8c
  52. #define K_F3     0x8d
  53. #define K_F4     0x8e
  54. #define K_F5     0x8f
  55. #define K_F6     0x90
  56. #define K_F7     0x91
  57. #define K_F8     0x92
  58. #define K_F9     0x93
  59. #define K_F10    0x94
  60. #define K_F11    0x95
  61. #define K_F12    0x96
  62. #define K_F13    0x97
  63. #define K_F14    0x98
  64. #define K_F15    0x99
  65. #define K_F16    0x9a
  66. #define K_F17    0x9b
  67. #define K_F18    0x9c
  68. #define K_F19    0x9d
  69. #define K_F20    0x9e
  70.  
  71. #define C_UP     0x9f
  72. #define C_DOWN   0xa0
  73. #define C_RIGHT  0xa1
  74. #define C_LEFT   0xa2
  75.  
  76. #define K_SRIGHT 0xa3   /* Special key on right */
  77. #define K_SLEFT  0xa4   /* Special key on left */
  78.  
  79. /****************************************************************************
  80. ** Special keys that are recognised under ASCII (here for convenience)
  81. */
  82.  
  83. #define K_BAKSPC 08
  84. #define K_TAB    09
  85. #define K_ENTER  10
  86. #define K_RETURN 10
  87. #define K_ESC    0x1b
  88.  
  89. #endif /* INPUT_KEYBOARD_I */
  90.